import time


def print_hello():
    print("Hello")
    print("当前时间戳是", time.time())


def loop_func(second):
    i = 0
    # 每隔second秒执行func函数
    while True:
        print("-------------------")
        time.sleep(second)

        i += 1
        if i == 5:
            return i

    ss = loop_func(1)
    print("ss==", ss)


def print_number(a):
    return a + 1


def select_loop(func, number_times, status):
    i = 0
    while True:
        i += 1
        time.sleep(1)
        print("i==", i)
        if i == number_times or status == func(3):
            return status


if __name__ == '__main__':
    res = select_loop(func=print_number, number_times=3, status=5)
    print(res)
